<?php
include_once 'application/controllers/AbstractController.php';
include_once 'application/models/Utilisateur.php';


/**
 * 
 * Used to check access authorisation to HTML pages
 * @author Nicolas Roussel
 *
 */
class FrontController extends AbstractController
{
	function indexAction()
	{
		$this->view->data = json_encode(Utilisateur::publicUserDatas($this->user));
	}

	function menuAction()
	{
		if (isset($this->user)) {
			$userData = Utilisateur::publicUserDatas($this->user);
		}else{
			$userData = Utilisateur::guestUserDatas($this->user);
		}
		$this->view->data = json_encode($userData);
	}

	function saisieAction()
	{
		$this->view->data = json_encode(Utilisateur::publicUserDatas($this->user));
	}
	
}